package v1

import (
	"ginTea/model"
	"ginTea/utils/errmsg"
	"net/http"

	"github.com/gin-gonic/gin"
)

// 获取统计数据
func GetStatistics(c *gin.Context) {
	var code int
	data := model.GetStatistics()
	code = errmsg.SUCCESS
	c.JSON(http.StatusOK, gin.H{
		"code":    code,
		"data":    data,
		"msg":     errmsg.GetErrMsg(code),
		"success": true,
	})
}
